package cn.wolfcode.luowowo.member.mapper;

import cn.wolfcode.luowowo.member.domain.UserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserInfoMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserInfo record);

    UserInfo selectByPrimaryKey(Long id);

    List<UserInfo> selectAll();

    int updateByPrimaryKey(UserInfo record);

    int selectUniqueByPhone(String phone);

    UserInfo selectUserByUsernameAndPassword(@Param("username") String username,
                                             @Param("password") String password);

    List<Long> findFocusUserIdList(Long id);

    List<Long> findFansUserIdList(Long id);

    void updateHeadImgUrl(UserInfo userInfo);

    void updatePasswordById(@Param("password") String password, @Param("userId") Long userId);

    void updateEmailById(@Param("email") String email, @Param("userId") Long userId);

    void updatePhoneById(@Param("phone") String phone, @Param("userId") Long userId);

    void addBlackUser(@Param("userId") Long userId, @Param("blackUserId") Long blackUserId);

    void deleteBlackUserByUserId(@Param("userId")Long userId,@Param("blackUserId") Long blackUserId);

    List<Long> blackUserIdList(Long userId);

    Long isExistsBlackUserIdByUserId(@Param("userId")Long userId, @Param("blackUserId")Long blackUserId);
}